<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学习报告 - 学知题库</title>
    <link href="../assets/css/app.css" rel="stylesheet">
    <link href="../assets/css/font-awesome.min.css" rel="stylesheet">
    <script src="../assets/js/chart.umd.min.js"></script>
    
    <!-- Tailwind 配置 - 已合并到公共配置文件 -->
    <!-- 
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CBCB',
                        accent: '#FF7D00',
                        neutral: '#F5F7FA',
                        'neutral-dark': '#4E5969',
                        success: '#00B42A',
                        warning: '#FF7D00',
                        danger: '#F53F3F',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    -->
    
    <!-- 工具类样式 - 已合并到 src/input.css -->
    <!-- 
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .card-hover {
                transition: all 0.3s ease;
            }
            .card-hover:hover {
                transform: translateY(-5px);
                box-shadow: 0 10px 20px rgba(0,0,0,0.08);
            }
            .bg-gradient-primary {
                background: linear-gradient(135deg, #165DFF 0%, #0E42B3 100%);
            }
            .progress-ring-circle {
                transition: stroke-dashoffset 0.35s;
                transform: rotate(-90deg);
                transform-origin: 50% 50%;
            }
            .animate-float {
                animation: float 3s ease-in-out infinite;
            }
            @keyframes float {
                0% { transform: translateY(0px); }
                50% { transform: translateY(-10px); }
                100% { transform: translateY(0px); }
            }
        }
    </style>
    -->
</head>
<body class="bg-gray-50 font-inter text-gray-800 min-h-screen flex flex-col">
    <!-- 顶部导航栏 -->
    <header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <a href="#" class="flex items-center">
                    <i class="fa fa-graduation-cap text-primary text-2xl mr-2"></i>
                    <h1 class="text-xl font-bold text-gray-800">学知题库</h1>
                </a>
            </div>
            
            <div class="hidden md:flex items-center space-x-6">
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">首页</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">题库</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">学习路径</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">模拟考试</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">关于我们</a>
            </div>
            
            <div class="flex items-center space-x-4">
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <img src="https://picsum.photos/40/40?random=user" alt="用户头像" class="w-10 h-10 rounded-full border-2 border-primary">
                    </div>
                    <span class="hidden md:inline text-gray-700">张同学</span>
                </div>
            </div>
        </div>
    </header>

    <!-- 主内容区（学习报告页面） -->
    <main class="flex-1 py-8 bg-gray-50">
        <div class="container mx-auto px-4">
            <!-- 页面标题与时间筛选 -->
            <div class="mb-8 flex flex-col md:flex-row md:items-center justify-between gap-4">
                <div>
                    <h2 class="text-2xl font-bold text-gray-800">学习报告</h2>
                    <p class="text-gray-500 mt-1">全面分析您的学习情况与进步轨迹</p>
                </div>
                <div class="flex gap-2">
                    <button class="px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">本周</button>
                    <button class="px-4 py-2 bg-white text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">本月</button>
                    <button class="px-4 py-2 bg-white text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">本学期</button>
                </div>
            </div>

            <!-- 学习总览卡片 -->
            <div class="bg-white rounded-2xl shadow-sm p-6 mb-8">
                <div class="flex flex-col md:flex-row md:items-center justify-between mb-6">
                    <h3 class="text-lg font-bold text-gray-800">学习总览</h3>
                    <div class="flex items-center gap-2 text-sm">
                        <span class="text-gray-500">与上周相比：</span>
                        <span class="text-success flex items-center">
                            <i class="fa fa-arrow-up mr-1"></i>整体进步12%
                        </span>
                    </div>
                </div>

                <!-- 核心数据指标 -->
                <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
                    <div class="bg-neutral rounded-xl p-6">
                        <div class="flex items-center justify-between mb-4">
                            <h4 class="text-gray-600 font-medium">总学习时长</h4>
                            <div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center">
                                <i class="fa fa-clock-o text-primary"></i>
                            </div>
                        </div>
                        <div class="flex items-end gap-2">
                            <span class="text-3xl font-bold text-gray-800">36.5h</span>
                            <span class="text-success flex items-center text-sm mb-1">
                                <i class="fa fa-arrow-up mr-1"></i>8.2h
                            </span>
                        </div>
                        <div class="w-full bg-gray-200 rounded-full h-2 mt-4">
                            <div class="bg-primary h-2 rounded-full" style="width: 73%"></div>
                        </div>
                        <p class="text-gray-500 text-xs mt-2">较上周提升29%</p>
                    </div>

                    <div class="bg-neutral rounded-xl p-6">
                        <div class="flex items-center justify-between mb-4">
                            <h4 class="text-gray-600 font-medium">总做题数</h4>
                            <div class="w-10 h-10 rounded-full bg-secondary/10 flex items-center justify-center">
                                <i class="fa fa-pencil text-secondary"></i>
                            </div>
                        </div>
                        <div class="flex items-end gap-2">
                            <span class="text-3xl font-bold text-gray-800">1,286</span>
                            <span class="text-success flex items-center text-sm mb-1">
                                <i class="fa fa-arrow-up mr-1"></i>145题
                            </span>
                        </div>
                        <div class="w-full bg-gray-200 rounded-full h-2 mt-4">
                            <div class="bg-secondary h-2 rounded-full" style="width: 65%"></div>
                        </div>
                        <p class="text-gray-500 text-xs mt-2">较上周提升12.7%</p>
                    </div>

                    <div class="bg-neutral rounded-xl p-6">
                        <div class="flex items-center justify-between mb-4">
                            <h4 class="text-gray-600 font-medium">平均正确率</h4>
                            <div class="w-10 h-10 rounded-full bg-success/10 flex items-center justify-center">
                                <i class="fa fa-check text-success"></i>
                            </div>
                        </div>
                        <div class="flex items-end gap-2">
                            <span class="text-3xl font-bold text-gray-800">78%</span>
                            <span class="text-success flex items-center text-sm mb-1">
                                <i class="fa fa-arrow-up mr-1"></i>3.2%
                            </span>
                        </div>
                        <div class="w-full bg-gray-200 rounded-full h-2 mt-4">
                            <div class="bg-success h-2 rounded-full" style="width: 78%"></div>
                        </div>
                        <p class="text-gray-500 text-xs mt-2">较上周提升4.3%</p>
                    </div>

                    <div class="bg-neutral rounded-xl p-6">
                        <div class="flex items-center justify-between mb-4">
                            <h4 class="text-gray-600 font-medium">掌握知识点</h4>
                            <div class="w-10 h-10 rounded-full bg-accent/10 flex items-center justify-center">
                                <i class="fa fa-lightbulb-o text-accent"></i>
                            </div>
                        </div>
                        <div class="flex items-end gap-2">
                            <span class="text-3xl font-bold text-gray-800">46个</span>
                            <span class="text-success flex items-center text-sm mb-1">
                                <i class="fa fa-arrow-up mr-1"></i>8个
                            </span>
                        </div>
                        <div class="w-full bg-gray-200 rounded-full h-2 mt-4">
                            <div class="bg-accent h-2 rounded-full" style="width: 58%"></div>
                        </div>
                        <p class="text-gray-500 text-xs mt-2">较上周新增17.4%</p>
                    </div>
                </div>
            </div>

            <!-- 学科分析与趋势图表 -->
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
                <!-- 学科正确率分布 -->
                <div class="bg-white rounded-xl shadow-sm p-6 lg:col-span-1">
                    <h3 class="text-lg font-bold text-gray-800 mb-6">学科正确率</h3>
                    <div class="h-64">
                        <canvas id="subjectChart"></canvas>
                    </div>
                    <div class="mt-6 space-y-4">
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm text-gray-600">数学</span>
                                <span class="text-sm font-medium">82%</span>
                            </div>
                            <div class="w-full bg-gray-100 rounded-full h-2">
                                <div class="bg-primary h-2 rounded-full" style="width: 82%"></div>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm text-gray-600">语文</span>
                                <span class="text-sm font-medium">88%</span>
                            </div>
                            <div class="w-full bg-gray-100 rounded-full h-2">
                                <div class="bg-secondary h-2 rounded-full" style="width: 88%"></div>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm text-gray-600">英语</span>
                                <span class="text-sm font-medium">75%</span>
                            </div>
                            <div class="w-full bg-gray-100 rounded-full h-2">
                                <div class="bg-accent h-2 rounded-full" style="width: 75%"></div>
                            </div>
                        </div>
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm text-gray-600">物理</span>
                                <span class="text-sm font-medium">65%</span>
                            </div>
                            <div class="w-full bg-gray-100 rounded-full h-2">
                                <div class="bg-warning h-2 rounded-full" style="width: 65%"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 学习趋势 -->
                <div class="bg-white rounded-xl shadow-sm p-6 lg:col-span-2">
                    <div class="flex justify-between items-center mb-6">
                        <h3 class="text-lg font-bold text-gray-800">学习趋势</h3>
                        <div class="flex gap-2">
                            <button class="px-3 py-1 text-sm bg-primary/10 text-primary rounded-lg">正确率</button>
                            <button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded-lg hover:bg-gray-200 transition-colors">做题数</button>
                            <button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded-lg hover:bg-gray-200 transition-colors">时长</button>
                        </div>
                    </div>
                    <div class="h-64">
                        <canvas id="trendChart"></canvas>
                    </div>
                </div>
            </div>

            <!-- 薄弱知识点与推荐学习 -->
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
                <!-- 薄弱知识点 -->
                <div class="bg-white rounded-xl shadow-sm p-6 lg:col-span-1">
                    <h3 class="text-lg font-bold text-gray-800 mb-6 flex items-center">
                        <i class="fa fa-exclamation-circle text-warning mr-2"></i>薄弱知识点
                    </h3>
                    <div class="space-y-4">
                        <div class="p-4 bg-neutral rounded-lg card-hover">
                            <h4 class="font-medium text-gray-800">物理 - 圆周运动</h4>
                            <p class="text-gray-500 text-sm mt-1">正确率38% · 需加强</p>
                            <a href="#" class="text-primary text-sm mt-2 inline-block hover:underline">针对性练习 →</a>
                        </div>
                        <div class="p-4 bg-neutral rounded-lg card-hover">
                            <h4 class="font-medium text-gray-800">数学 - 三角函数图像</h4>
                            <p class="text-gray-500 text-sm mt-1">正确率45% · 需加强</p>
                            <a href="#" class="text-primary text-sm mt-2 inline-block hover:underline">针对性练习 →</a>
                        </div>
                        <div class="p-4 bg-neutral rounded-lg card-hover">
                            <h4 class="font-medium text-gray-800">英语 - 过去完成时</h4>
                            <p class="text-gray-500 text-sm mt-1">正确率52% · 需巩固</p>
                            <a href="#" class="text-primary text-sm mt-2 inline-block hover:underline">针对性练习 →</a>
                        </div>
                    </div>
                    <a href="#" class="mt-6 inline-block w-full py-2 text-center border border-primary text-primary rounded-lg hover:bg-primary/5 transition-colors">
                        查看全部薄弱点
                    </a>
                </div>

                <!-- 推荐学习 -->
                <div class="bg-white rounded-xl shadow-sm p-6 lg:col-span-2">
                    <h3 class="text-lg font-bold text-gray-800 mb-6 flex items-center">
                        <i class="fa fa-lightbulb-o text-accent mr-2"></i>推荐学习内容
                    </h3>
                    <div class="space-y-4">
                        <div class="p-4 border border-gray-100 rounded-lg hover:border-primary/30 hover:bg-primary/5 transition-colors flex flex-col md:flex-row md:items-center justify-between">
                            <div class="flex items-start gap-4">
                                <div class="w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0">
                                    <i class="fa fa-book text-primary text-xl"></i>
                                </div>
                                <div>
                                    <h4 class="font-medium text-gray-800">圆周运动专题突破</h4>
                                    <p class="text-gray-500 text-sm mt-1">物理 · 15道精选题 · 预计25分钟</p>
                                </div>
                            </div>
                            <button class="mt-4 md:mt-0 px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">
                                开始练习
                            </button>
                        </div>
                        <div class="p-4 border border-gray-100 rounded-lg hover:border-primary/30 hover:bg-primary/5 transition-colors flex flex-col md:flex-row md:items-center justify-between">
                            <div class="flex items-start gap-4">
                                <div class="w-12 h-12 rounded-lg bg-secondary/10 flex items-center justify-center flex-shrink-0">
                                    <i class="fa fa-play-circle text-secondary text-xl"></i>
                                </div>
                                <div>
                                    <h4 class="font-medium text-gray-800">三角函数图像精讲</h4>
                                    <p class="text-gray-500 text-sm mt-1">数学 · 视频讲解 · 配套练习题</p>
                                </div>
                            </div>
                            <button class="mt-4 md:mt-0 px-4 py-2 bg-secondary text-white rounded-lg hover:bg-secondary/90 transition-colors">
                                观看视频
                            </button>
                        </div>
                        <div class="p-4 border border-gray-100 rounded-lg hover:border-primary/30 hover:bg-primary/5 transition-colors flex flex-col md:flex-row md:items-center justify-between">
                            <div class="flex items-start gap-4">
                                <div class="w-12 h-12 rounded-lg bg-accent/10 flex items-center justify-center flex-shrink-0">
                                    <i class="fa fa-graduation-cap text-accent text-xl"></i>
                                </div>
                                <div>
                                    <h4 class="font-medium text-gray-800">时态专项训练 - 过去完成时</h4>
                                    <p class="text-gray-500 text-sm mt-1">英语 · 20道题 · 预计30分钟</p>
                                </div>
                            </div>
                            <button class="mt-4 md:mt-0 px-4 py-2 bg-accent text-white rounded-lg hover:bg-accent/90 transition-colors">
                                开始练习
                            </button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 学习建议 -->
            <div class="bg-white rounded-xl shadow-sm p-6 mb-8">
                <h3 class="text-lg font-bold text-gray-800 mb-6 flex items-center">
                    <i class="fa fa-commenting text-primary mr-2"></i>学习建议
                </h3>
                <div class="bg-primary/5 rounded-xl p-6 border border-primary/20">
                    <p class="text-gray-700 mb-4">
                        本周您的学习状态良好，整体表现较上周有明显提升。语文和数学学科表现突出，但物理学科的圆周运动知识点掌握不够扎实。
                    </p>
                    <p class="text-gray-700 mb-4">
                        建议优先完成推荐的圆周运动专题练习，并观看相关知识点讲解视频。英语时态部分需加强应用练习，可每天花15分钟进行针对性训练。
                    </p>
                    <p class="text-gray-700">
                        您的学习时间主要集中在晚间，建议适当分配部分时间到下午时段，保持更均衡的学习节奏。
                    </p>
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="bg-gray-800 text-white py-12 mt-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <div class="flex items-center mb-4">
                        <i class="fa fa-graduation-cap text-primary text-2xl mr-2"></i>
                        <h3 class="text-xl font-bold">学知题库</h3>
                    </div>
                    <p class="text-gray-400 mb-4">智能教育资源平台，助力学生高效学习</p>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-weibo"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-wechat"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-qq"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-github"></i>
                        </a>
                    </div>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">快速链接</h4>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">首页</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">题库</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">学习路径</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">模拟考试</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">关于我们</a></li>
                    </ul>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">帮助中心</h4>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">常见问题</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">使用指南</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">意见反馈</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">联系我们</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">隐私政策</a></li>
                    </ul>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">联系我们</h4>
                    <ul class="space-y-2">
                        <li class="flex items-center">
                            <i class="fa fa-map-marker text-primary mr-2"></i>
                            <span class="text-gray-400">北京市海淀区中关村大街1号</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-phone text-primary mr-2"></i>
                            <span class="text-gray-400">400-123-4567</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-envelope text-primary mr-2"></i>
                            <span class="text-gray-400">contact@xuezhi.com</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-clock-o text-primary mr-2"></i>
                            <span class="text-gray-400">周一至周日 9:00-21:00</span>
                        </li>
                    </ul>
                </div>
            </div>
            
            <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
                <p>&copy; 2025 学知题库 版权所有 | 京ICP备12345678号</p>
            </div>
        </div>
    </footer>

    <!-- JavaScript -->
    <script>
        // 导航栏滚动效果
        window.addEventListener('scroll', function() {
            const header = document.querySelector('header');
            if (window.scrollY > 50) {
                header.classList.add('py-2');
                header.classList.remove('py-3');
                header.classList.add('shadow');
            } else {
                header.classList.add('py-3');
                header.classList.remove('py-2');
                header.classList.remove('shadow');
            }
        });

        // 图表初始化
        document.addEventListener('DOMContentLoaded', function() {
            // 学科正确率图表
            const subjectCtx = document.getElementById('subjectChart').getContext('2d');
            new Chart(subjectCtx, {
                type: 'doughnut',
                data: {
                    labels: ['数学', '语文', '英语', '物理'],
                    datasets: [{
                        data: [82, 88, 75, 65],
                        backgroundColor: [
                            '#165DFF',
                            '#36CBCB',
                            '#FF7D00',
                            '#FF7D00'
                        ],
                        borderWidth: 0,
                        hoverOffset: 4
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    cutout: '70%',
                    plugins: {
                        legend: {
                            display: false
                        }
                    }
                }
            });

            // 学习趋势图表
            const trendCtx = document.getElementById('trendChart').getContext('2d');
            new Chart(trendCtx, {
                type: 'line',
                data: {
                    labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
                    datasets: [{
                        label: '正确率',
                        data: [72, 68, 75, 70, 80, 82, 78],
                        borderColor: '#165DFF',
                        backgroundColor: 'rgba(22, 93, 255, 0.1)',
                        tension: 0.4,
                        fill: true,
                        pointBackgroundColor: '#fff',
                        pointBorderColor: '#165DFF',
                        pointBorderWidth: 2,
                        pointRadius: 4
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        legend: {
                            display: false
                        }
                    },
                    scales: {
                        y: {
                            beginAtZero: false,
                            min: 50,
                            max: 100,
                            ticks: {
                                callback: function(value) {
                                    return value + '%';
                                }
                            },
                            grid: {
                                drawBorder: false
                            }
                        },
                        x: {
                            grid: {
                                display: false
                            }
                        }
                    }
                }
            });
        });

        // 返回顶部按钮
        const backToTopButton = document.createElement('button');
        backToTopButton.id = 'backToTop';
        backToTopButton.className = 'fixed bottom-6 right-6 bg-primary text-white w-12 h-12 rounded-full flex items-center justify-center shadow-lg opacity-0 transition-opacity duration-300 hover:bg-primary/90';
        backToTopButton.innerHTML = '<i class="fa fa-arrow-up"></i>';
        document.body.appendChild(backToTopButton);
        
        window.addEventListener('scroll', function() {
            if (window.scrollY > 300) {
                backToTopButton.classList.add('opacity-100');
                backToTopButton.classList.remove('opacity-0');
            } else {
                backToTopButton.classList.add('opacity-0');
                backToTopButton.classList.remove('opacity-100');
            }
        });
        
        backToTopButton.addEventListener('click', function() {
            window.scrollTo({
                top: 0,
                behavior: 'smooth'
            });
        });
    </script>
</body>
</html>